# -*- coding: utf-8 -*-
'''
Class dataGridView
'''
import wx

'''
create columns for statistic 1
@param list_ctrl the list on the screen
'''
def createCols_stats1(list_ctrl):
    list_ctrl.DeleteAllColumns()    
    list_ctrl.InsertColumn(0, "Number of Stablishments");
    list_ctrl.SetColumnWidth(0,200);

    list_ctrl.InsertColumn(1, "Year");
    list_ctrl.SetColumnWidth(1,100);    


'''
create columns for statistic 2
@param list_ctrl the list on the screen
'''
def createCols_stats2(list_ctrl):
    list_ctrl.DeleteAllColumns()    
    list_ctrl.InsertColumn(0, "Number of Teachers");
    list_ctrl.SetColumnWidth(0,200);

    list_ctrl.InsertColumn(1, "Category");
    list_ctrl.SetColumnWidth(1,200);

    list_ctrl.InsertColumn(2, "Name Stablishment");
    list_ctrl.SetColumnWidth(2,200);

    list_ctrl.InsertColumn(3, "Year");
    list_ctrl.SetColumnWidth(3,100);    




'''
create columns for statistic 3
@param list_ctrl the list on the screen
'''
def createCols_stats3(list_ctrl):
    list_ctrl.DeleteAllColumns()    
    list_ctrl.InsertColumn(0, "Number of Teachers");
    list_ctrl.SetColumnWidth(0,200);

    list_ctrl.InsertColumn(1, "Degree");
    list_ctrl.SetColumnWidth(1,200);
    
    list_ctrl.InsertColumn(2, "Name Stablishment");
    list_ctrl.SetColumnWidth(2,200);

    list_ctrl.InsertColumn(3, "Category");
    list_ctrl.SetColumnWidth(3,200);

    list_ctrl.InsertColumn(4, "Year");
    list_ctrl.SetColumnWidth(4,100);


'''
load stistics list to the grid in the interface
@param self the object
@param col the number of columns
@param myList the list with stistic values
@param list_ctrl the list on the screen
'''
def load_screen_list(self, col, myList, list_ctrl):
    
    x = 0
   
    list_ctrl.DeleteAllItems()
    
    for row in lista:            
        if x != len(myList):
            index = list_ctrl.InsertStringItem(x, '')
            pass
        x += 1        
        for i in range(len(row)):
            if type(row[i]) is unicode:    
                list_ctrl.SetStringItem(index,i, (row[i]).encode('utf-8'))
            else:
                list_ctrl.SetStringItem(index,i, str(row[i]))
                
                pass
            pass           
        pass
    pass




    
